<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
<title>录入快递</title>
        <link rel="stylesheet" type="text/css" href="/CMS/css/bootstrap.min.css" />
         <link rel="stylesheet" type="text/css" href="/CMS/css/express.css" />
<link rel="stylesheet" type="text/css" href="/IMS/css/DefaultSkin.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/load.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/control.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/list.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/anim.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/page.css?v=1.0" /><!-- 这个里面有字体,加个版本号不进行更新 -->
<link rel="stylesheet" type="text/css" href="/IMS/css/comm.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/select2/select2.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/zTreeStyle/zTreeStyle.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/core.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/js/plugins/file/uploadify/uploadify.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/js/plugins/treeview/jquery.treeview.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/multi-select.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/jeasy-ui/easyui.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/js/plugins/poshytip/tip-darkgray/tip-darkgray.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/addinfo.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/prettyPhoto.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/jquery-ui-1.10.4.custom.min.css?v=20180712190507493" />
<link rel="stylesheet" type="text/css" href="/IMS/css/jquery.editable-select.min.css?v=20180712190507493" />
<script type="text/javascript" src="/IMS/js/jquery-1.11.2.min.js?v=20180712190507542"></script>
<!-- 新增加 -->
<script type="text/javascript" src="/IMS/js/plugins/comm/jquery-ajax.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/securityProtect.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/jquery-ajax-response-handler.js?v=20180712190507542"></script>
<!-- 新增加 END -->
<script type="text/javascript" src="/IMS/js/common/public-obj.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/bind.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/controls.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/slide.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/switch.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/initial.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/print/printhtml.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/listBox.js?v=20180712190507542"></script>

<script type="text/javascript" src="/IMS/js/plugins/My97DatePicker/WdatePicker.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/file/uploadify/jquery.uploadify.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/layer/layer.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/select2/select2.full.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/select2/i18n/zh-CN.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/treeview/jquery.treeview.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/form/jquery.form.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.core-3.5.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.excheck-3.5.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/constant.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/common.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/bmsAjax.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/comm/validata.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/validate/jquery.validate.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/validate/localization/messages_zh.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/validate/regValidate.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/popup_layer.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery_magnifier.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery.multi-select.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery.quicksearch.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/jquery.easyui.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery.prettyPhoto.js?v=20180712190507542"></script>

<script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.zh-CN.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/bsgrid/bsgrid.all.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.extend.min.js?v=20180712190507542"></script>
<script type="text/javascript" charset="UTF-8" src="/IMS/js/plugins/poshytip/jquery.poshytip.js?v=20180712190507542"></script>

<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery-ui-1.10.4.custom.min.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/joinUs/AddListBox.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery.editable-select.min.js?v=20180712190507542"></script>

<!-- echarts -->
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/echarts.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/bar.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/line.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/pie.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
<script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
        <script type="text/javascript" src="/CMS/js/express/index.js"></script>
<!-- bootstrap -->
	</head>

	<body>
    <div>
    <div class="icip_title_box" style="margin-bottom: 20px;">
        <div class="left">
            <span class="icip_title_text" style="margin-left: 20px;">录入快递信息</span>
            <span class="icip_button">
				<a href="/CMS/express/express.ht">返回上级</a>
			</span>

        </div>

    </div>
</div>
		<form action="/CMS/express/saveexpress.ht" method="POST" >
		<div class="container unsalable-dish">
			<div class="row">
				<ul class="col-xs-12 col-sm-12 col-md-12 col-lg-12 unsalable-text">
					<li class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
						<div class="express-title fl">内容：</div>
						<input name="strExpressType" class="express-text form-control fl" type="text" placeholder="您的快递已经到达小区，请领件。" />
					</li>
					<li class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
						<div class="site-box">
							<div class="express-title fl">地址：</div>
							<select id="plot" name="strCommunityId" class="site-one form-control fl" type="text"  />
                                    <option value="" selected="selected" style="display: none;">请选择小区</option>
							</select>
						</div>
                        <div class="site-box" style="display:none">
							<div class="express-title fl">ID：</div>
							<select id="plotID" name="strCommunityId" class="site-one form-control fl" type="text"  />
                                    <option value="" selected="selected" style="display: none;"></option>
							</select>
						</div>
						<div class="site-box">
							<div class="express-title fl">楼号：</div>
							<input type="text" name="belongBuildingNum" class="form-control fl" name="" id="" value="" placeholder="请输入楼号" />
						</div>
						<div class="site-box">
							<div class="express-title fl">单元号：</div>
							<input type="text" name="belongBuildingUnit" class="form-control fl" id="" value="" placeholder="请输入单元号" />
						</div>
						<div class="site-box">
							<div class="express-title fl">门牌号：</div>
							<input type="text" name="houseNum" class="form-control fl" id="" value="" placeholder="请输入门牌号" />
						</div>

					</li>

				</ul>

				
			</div>
		</div>
		
		<input class="submit-btn" id="" type="submit" style="border: 0;" value="录入信息"/>
		</form>
	</body>

	<script type="text/javascript">

        $(function () {
            //方式一 Ajax方式获取Json数据
            $.ajax({
                url: '/CMS/express/selcommunity.ht',
                type: 'GET',
                dataType: 'json',
              //  data: {'strCommunityId': strcommunityId},
                beforeSend: LoadFunction, //加载执行方法
                error: erryFunction,  //错误执行方法
                success: succFunction //成功执行方法
            });

            function LoadFunction() {
                $("#plot").html('加载中...');
            }

            function erryFunction() {
                alert("error");
            }

            function succFunction(tt) {
                var json = eval(tt); //数组
                var tt = "";
                var dd = "";

                $.each(json, function (index) {
                    //循环获取数据
                    console.log(json)
                    var Name = json[index].strComname;
                     var CID = json[index].strcommunityId;
                    tt += "<option value='"+CID+"'>" + Name + "</option>";
                    dd +="<option id="+CID+">"+ CID + "</option>";

                });
                $("#plot").html('');
                $("#plot").html(tt);
                $("#plotID").html(dd);
            }
        })
        //提交
        $(".submit-btn").on("click", function () {
             $.ajax({
                url: '/CMS/express/saveexpress.ht',
                type: 'GET',
                dataType: 'json',

                error: erryFunction,  //错误执行方法
                success: succFunction //成功执行方法

            });
             function succFunction(tt) {
                var json = eval(tt); //数组
                var tt = "";
                var dd = "";

                $.each(json, function (index) {
                    //循环获取数据
                    console.log(json)
                    var Name = json[index].strComname;
                     var CID = json[index].strcommunityId;
                    tt += "<option >" + Name + "</option>";
                    dd +="<option id="+CID+">"+ CID + "</option>";

                });
                $("#plot").html('');
                $("#plot").html(tt);
                $("#plotID").html(dd);
            }
            if ($("input[name='strExpressType']").val() == '') {
                layer.msg('内容不能为空!');
                return false;
            } else if ($("input[name='strCommunityId ']").val() == '') {
                layer.msg('小区不能为空!');
                return false;
            } else if ($("input[name='belongBuildingNum']").val() == '') {
                layer.msg('楼号不能为空!');
                return false;
            } else if ($("input[name='belongBuildingUnit']").val() == '') {
                layer.msg('单元号不能为空!');
                return false;
            } else if ($("input[name='houseNum']").val() == '') {
                layer.msg('门牌号不能为空!');
                return false;
            }

            //self.location='/CMS/express/express.ht';

        });

    </script>
</html>